package com.huitone.gddw.service.dto;

import com.huitone.gddw.common.excel.ColToProperty;
import com.huitone.gddw.common.excel.TabCol;
import com.huitone.gddw.dao.entity.BlackUse;

/**
 * 黑名单用户 DTO 对象
 * @author wuluodan
 *
 */
public class BlackUseDTO {

	@ColToProperty
	@TabCol(Index = 1, title = "序号", width = "")
	private Integer seq;
	
	private String recId;
	
	private String svrNode;
	
	@ColToProperty
	@TabCol(Index = 2, title = "业务端名称", width = "90")
	private String svrNodeName;
	
	private String serviceCode;
	
	@ColToProperty
	@TabCol(Index = 3, title = "短信类型名称", width = "90")
	private String serviceName;
	
	@ColToProperty
	@TabCol(Index = 4, title = "黑名单号码", width = "90")
	private String blackUser;
	
	private String status;
	
	@ColToProperty
	@TabCol(Index = 5, title = "状态", width = "")
	private String statusStr;
	
	@ColToProperty
	@TabCol(Index = 6, title = "黑名单说明", width = "150")
	private String desc;
	
	@ColToProperty
	@TabCol(Index = 7, title = "来源", width = "90")
	private String source;
	
	public BlackUseDTO() {}
	
	public BlackUseDTO(BlackUse entity) {
		this.setRecId(entity.getRecId());
		this.setSvrNode(entity.getSvrNode());
		this.setServiceCode(entity.getServiceCode());
		this.setBlackUser(entity.getBlackUser());
		this.setStatus(entity.getStatus());
		this.setDesc(entity.getDesc());
	}

	public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public String getRecId() {
		return recId;
	}

	public void setRecId(String recId) {
		this.recId = recId;
	}

	public String getSvrNode() {
		return svrNode;
	}

	public void setSvrNode(String svrNode) {
		this.svrNode = svrNode;
	}

	public String getSvrNodeName() {
		return svrNodeName;
	}

	public void setSvrNodeName(String svrNodeName) {
		this.svrNodeName = svrNodeName;
	}

	public String getServiceCode() {
		return serviceCode;
	}

	public void setServiceCode(String serviceCode) {
		this.serviceCode = serviceCode;
	}

	public String getServiceName() {
		return serviceName;
	}

	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}

	public String getBlackUser() {
		return blackUser;
	}

	public void setBlackUser(String blackUser) {
		this.blackUser = blackUser;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getStatusStr() {
		if (null == this.status) {
			return "未知";
		}
		if (this.status.equals("1")) {
			return "有效";
		}
		if (this.status.equals("0")) {
			return "失效";
		}
		return "未知";
	}

	public void setStatusStr(String statusStr) {
		this.statusStr = statusStr;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getSource() {
		if (null == this.source) {
			return "导入";
		}
		if (this.source.equals("1")) {
			return "识别";
		}
		if (this.source.equals("0")) {
			return "导入";
		}
		return "导入";
	}

	public void setSource(String source) {
		this.source = source;
	}
	
}
